package com.xjk.education.service.impl;

import java.util.List;
import com.xjk.common.utils.DateUtils;
import com.xjk.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xjk.education.mapper.EduGradeexamMapper;
import com.xjk.education.domain.EduGradeexam;
import com.xjk.education.service.IEduGradeexamService;

/**
 * 考试信息Service业务层处理
 * 
 * @author xjk
 * @date 2024-07-21
 */
@Service
public class EduGradeexamServiceImpl implements IEduGradeexamService 
{
    @Autowired
    private EduGradeexamMapper eduGradeexamMapper;

    /**
     * 查询考试信息
     * 
     * @param examId 考试信息主键
     * @return 考试信息
     */
    @Override
    public EduGradeexam selectEduGradeexamByExamId(Long examId)
    {
        return eduGradeexamMapper.selectEduGradeexamByExamId(examId);
    }

    /**
     * 查询考试信息列表
     * 
     * @param eduGradeexam 考试信息
     * @return 考试信息
     */
    @Override
    public List<EduGradeexam> selectEduGradeexamList(EduGradeexam eduGradeexam)
    {
        return eduGradeexamMapper.selectEduGradeexamList(eduGradeexam,SecurityUtils.getUserId());
    }

    /**
     * 新增考试信息
     * 
     * @param eduGradeexam 考试信息
     * @return 结果
     */
    @Override
    public int insertEduGradeexam(EduGradeexam eduGradeexam)
    {
        eduGradeexam.setCreateTime(DateUtils.getNowDate());
        return eduGradeexamMapper.insertEduGradeexam(eduGradeexam);
    }

    /**
     * 修改考试信息
     * 
     * @param eduGradeexam 考试信息
     * @return 结果
     */
    @Override
    public int updateEduGradeexam(EduGradeexam eduGradeexam)
    {
        eduGradeexam.setUpdateTime(DateUtils.getNowDate());
        return eduGradeexamMapper.updateEduGradeexam(eduGradeexam);
    }

    /**
     * 批量删除考试信息
     * 
     * @param examIds 需要删除的考试信息主键
     * @return 结果
     */
    @Override
    public int deleteEduGradeexamByExamIds(Long[] examIds)
    {
        return eduGradeexamMapper.deleteEduGradeexamByExamIds(examIds);
    }

    /**
     * 删除考试信息信息
     * 
     * @param examId 考试信息主键
     * @return 结果
     */
    @Override
    public int deleteEduGradeexamByExamId(Long examId)
    {
        return eduGradeexamMapper.deleteEduGradeexamByExamId(examId);
    }
}
